package nc.ui.qc.c011.ace.action;

import nc.ui.pubapp.uif2app.actions.BodyDelLineAction;
import nc.ui.pubapp.uif2app.model.BillManageModel;
import nc.ui.uif2.UIState;

public class C011BodyDelLineAction extends BodyDelLineAction {

	private static final long serialVersionUID = 677094546462275913L;
	
	private BillManageModel model;
	
	protected boolean isActionEnable() {
		if(UIState.EDIT != getModel().getUiState() && UIState.ADD != getModel().getUiState()) {
			super.setEnabled(false);
			return false;
		}
		String currentBodyTableCode = getCardPanel().getCurrentBodyTableCode();
		if("pk_applybill_b".equals(currentBodyTableCode)) {
			return true;
		}else {
			return false;
		}
	}

	public BillManageModel getModel() {
		return model;
	}

	public void setModel(BillManageModel model) {
		this.model = model;
		this.model.addAppEventListener(this);
	}
		
}
